package group.sicher.common.entity;

import javax.persistence.*;
import java.util.Objects;

/**
 * @Auth rock
 * @Date 2019/7/1 21:08
 * @description
 */
@Entity
@Table(name = "wm_shop_comment")
public class ShopCommentEntity {

    private Long id;
    private Long shopId;
    private Long consumerId;
    private String consumerName;
    private String consumerMobile;
    private String consumerUrl;
    private String starCount;
    private String content;
    private String foodContent;
    private String foodUrl;
    private Long createAt;
    private String shopReply;

       @Id
   @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "shop_id", nullable = false)
    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    @Basic
    @Column(name = "consumer_id", nullable = false)
    public Long getConsumerId() {
        return consumerId;
    }

    public void setConsumerId(Long consumerId) {
        this.consumerId = consumerId;
    }

    @Basic
    @Column(name = "consumer_name", nullable = true, length = 60)
    public String getConsumerName() {
        return consumerName;
    }

    public void setConsumerName(String consumerName) {
        this.consumerName = consumerName;
    }

    @Basic
    @Column(name = "consumer_mobile", nullable = true, length = 20)
    public String getConsumerMobile() {
        return consumerMobile;
    }

    public void setConsumerMobile(String consumerMobile) {
        this.consumerMobile = consumerMobile;
    }

    @Basic
    @Column(name = "consumer_url", nullable = true, length = 100)
    public String getConsumerUrl() {
        return consumerUrl;
    }

    public void setConsumerUrl(String consumerUrl) {
        this.consumerUrl = consumerUrl;
    }

    @Basic
    @Column(name = "star_count", nullable = true, length = 20)
    public String getStarCount() {
        return starCount;
    }

    public void setStarCount(String starCount) {
        this.starCount = starCount;
    }

    @Basic
    @Column(name = "content", nullable = true, length = 255)
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "food_content", nullable = true, length = 255)
    public String getFoodContent() {
        return foodContent;
    }

    public void setFoodContent(String foodContent) {
        this.foodContent = foodContent;
    }

    @Basic
    @Column(name = "food_url", nullable = true, length = -1)
    public String getFoodUrl() {
        return foodUrl;
    }

    public void setFoodUrl(String foodUrl) {
        this.foodUrl = foodUrl;
    }

    @Basic
    @Column(name = "create_at", nullable = true)
    public Long getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Long createAt) {
        this.createAt = createAt;
    }

    @Basic
    @Column(name = "shop_reply", nullable = true, length = -1)
    public String getShopReply() {
        return shopReply;
    }

    public void setShopReply(String shopReply) {
        this.shopReply = shopReply;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ShopCommentEntity that = (ShopCommentEntity) o;
        return id == that.id &&
                shopId == that.shopId &&
                consumerId == that.consumerId &&
                Objects.equals(consumerName, that.consumerName) &&
                Objects.equals(consumerMobile, that.consumerMobile) &&
                Objects.equals(consumerUrl, that.consumerUrl) &&
                Objects.equals(starCount, that.starCount) &&
                Objects.equals(content, that.content) &&
                Objects.equals(foodContent, that.foodContent) &&
                Objects.equals(foodUrl, that.foodUrl) &&
                Objects.equals(createAt, that.createAt) &&
                Objects.equals(shopReply, that.shopReply);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, shopId, consumerId, consumerName, consumerMobile, consumerUrl, starCount, content, foodContent, foodUrl, createAt, shopReply);
    }
}
